﻿
#region USING

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;

#endregion

namespace Learning.ConwaysGameOfLife.Tests
{
    [TestFixture]
    public class SettingUpIntialGameState : CommonTestFunctions
    {
		#region Constructors (1) 

        public SettingUpIntialGameState()
        {
        }

		#endregion Constructors 

		#region Methods (2) 

		// Public Methods (2) 

        [Test]
        public void CreateGameWith5AliveCellsInitially()
        {
            var intialAliveCells = this.GetIntialAliveCellList();

            GameOfLife game = new GameOfLife(10, intialAliveCells);

            List<Cell> liveCells = this.GetAliveCellList();

            Assert.That(game.AliveCells, Is.EquivalentTo(liveCells));
        }

        [Test]
        public void CreateGameWithOnlyCellR2C4Alive()
        {
            List<Cordinate> liveCells = new List<Cordinate>();

            liveCells.Add(new Cordinate(2, 4));

            GameOfLife game = new GameOfLife(10, liveCells);

            Assert.That(game.GetCellState(new Cordinate(2, 4)), Is.EqualTo(CellState.Alive));
        }

		#endregion Methods 
    }
}